#include "DataSave.h"
#include <string.h>
#include "Common.h"
#include "Parameters.h"
#include "bsp.h"

#include "ff.h"
#include "usart.h"
#include "userconfig.h"
#include "w25qxx.h"

void Param_Init(void) {
    if (Sys_Base.para.slave_id == PARA_NULL) {
        Sys_Base.para.slave_id = 2;
    }
    if (Sys_Base.para.type == PARA_NULL) {
        Sys_Base.para.type = 1;
    }
    if (Sys_Base.para.mod_num == PARA_NULL) {
        Sys_Base.para.mod_num = 0;
    }
    if (Sys_Base.para.reset == PARA_NULL) {
        Sys_Base.para.reset = 0;
    }
    if (Sys_Base.para.target_temp == PARA_INT16_NULL) {
        Sys_Base.para.target_temp = 250;
    }
    if (Sys_Base.para.start_dif[0] == PARA_INT16_NULL) {
        Sys_Base.para.start_dif[0] = 50;
    }
    if (Sys_Base.para.start_dif[1] == PARA_INT16_NULL) {
        Sys_Base.para.start_dif[1] = 50;
    }
    if (Sys_Base.para.High_temp == PARA_INT16_NULL) {
        Sys_Base.para.High_temp = 320;
    }
    if (Sys_Base.para.Low_temp == PARA_INT16_NULL) {
        Sys_Base.para.Low_temp = 200;
    }
}
